<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
	<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
	 <%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<script type="text/javascript" src="<%=basePath %>js/easyui/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="<%=basePath %>js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath %>js/easyui/locale/easyui-lang-zh_CN.js"></script>
<link rel="styleSheet" type="text/css" href="<%=basePath %>js/easyui/themes/icon.css"/>
<link rel="styleSheet" type="text/css" href="<%=basePath %>js/easyui/themes/default/easyui.css"/>

<div id="proj_detail">
<h2 style="margin:0px auto;width:100px;">题目详情</h2>
	<table style="width: 100%;">
		<tr  id="proj_title">
			<td style="width:40%;">题目名称:${proj.name }</td>
			<td style="width:30%;">发布日期:<fmt:parseDate value="${proj.publish_date }"  var="date" pattern="YYYY-MM-dd HH:mm:ss"/>
				<fmt:formatDate value="${date }" type="both"/>
			</td>
			<td style="width:30%;">导师:${proj.teacher.name }</td>
		</tr>
		<tr id="proj_desc">
			<td colspan="3">
				${proj.description}
			</td>
		</tr>
	</table>
	<hr/>
	<input type="hidden" id="tid" value="${user.id }">
	<c:if test="${user.enableChooseStudent==true&&user.maxLevel>0 }">
	<table width="100%" class="table  table-bordered  table-condensed table-hover  table-striped">
		<thead>
			<tr>
				<th>学号</th>
				<th>姓名</th>
				<th>专业</th>
				<th>志愿级别</th>
				<th>留言</th>
				<th>选择</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${intents }" var="intent">
			<tr>
				<td width="16%">${intent.student.no }</td>
				<td width="16%">${intent.student.name }</td>
				<td width="16%">${intent.student.classInfo.branch.name }</td>
				<td width="16%">${intent.formatLevel }</td>
				<td width="16%">${intent.message }</td>
				<td>
				<c:if test="${proj.stu_id!=null }">
				<c:if test="${proj.stu_id==intent.student.id }">
							<a href="cancelSel?proj_id=${proj.id }" class="btn btn-warning">退选</a>
						</c:if>
						<c:if test="${proj.stu_id!=intent.student.id }">
						<a href="javascript:void(0);" class="setReason  btn btn-info" name="${intent.id }">未选理由</a>
						</c:if>
				</c:if>
				<c:if test="${proj.stu_id==null&&user.selectWays==true }">
				<a href="javascript:void(0);" class="selStu btn btn-info" >选择</a>
				</c:if>
				<c:if test="${proj.stu_id==null&&user.selectWays==false }">
				<a href="javascript:void(0);" class="setStu  btn btn-info"  name="${proj.id }" num="${intent.student.id }">选择</a><span id="span${proj.id }"></span>
				</c:if>
				<input type="hidden"  class="stu_id" value="${intent.student.id }">
				<input type="hidden" class="proj_id" value="${proj.id }">
				</td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
	</c:if>

</div>
<div style="display:none;" id=""></div>
<div id="reasonDiv">
	
</div>